package com.ydl.zhwc.mvpandrxjava.sample.mvp;

import com.ydl.zhwc.mvpandrxjava.bean.Now;
import com.ydl.zhwc.mvpandrxjava.mvp.BasePresenter;
import com.ydl.zhwc.mvpandrxjava.mvp.BaseView;

import io.reactivex.Observable;

/**
 * author : Zhangwenchao
 * e-mail : zhangwch@yidianling.com
 * time   : 2017/12/22
 */

public interface MVPContract {

    interface View extends BaseView {
        void updateUI(Now now);
    }

    interface Presenter extends BasePresenter<View> {
        void loadNow();
    }

    interface OldModel {

        void getNow(Callback callback);

        interface Callback {

            void onSuccess(Now now);

            void onFail(String msg);
        }
    }

    interface Model {

        Observable<Now> getNow();
    }

}
